import request from '@/utils/request'

// 获取订单最低结算金额配置列表 account
export function getMinSettlementMoneyList (params) {
  return request({
    url: '/order/minimumSettlement',
    method: 'get',
    params: params,
  })
}

// 新增订单最低结算金额配置
export function addMinSettlementMoneyList (data) {
  return request({
    url: '/order/minimumSettlement',
    method: 'post',
    data: data
  })
}

// 修改订单最低结算金额配置
export function updMinSettlementMoneyList (id, data) {
  return request({
    url: '/order/minimumSettlement/' + id,
    method: 'put',
    data: data
  })
}

// 删除订单最低结算金额配置
export function delMinSettlementMoneyList (id) {
  return request({
    url: '/order/minimumSettlement/' + id,
    method: 'delete',
  })
}





// 获取订单最低结算金额区域配置列表
export function getConfigureRegionList (minimumSettlementId) {
  return request({
    url: `/order/minimumSettlement/${minimumSettlementId}/regions`,
    method: 'get',
  })
}
// 新增订单最低结算金额区域配置
export function addConfigureRegionList (minimumSettlementId, data) {
  return request({
    url: `/order/minimumSettlement/${minimumSettlementId}/regions`,
    method: 'post',
    data: data
  })
}
// 批量保存订单最低结算金额区域配置
export function addsConfigureRegionList (minimumSettlementId, data) {
  return request({
    url: `/order/minimumSettlement/batch/${minimumSettlementId}/regions`,
    method: 'post',
    data: data
  })
}
// 修改订单最低结算金额区域配置
export function updConfigureRegionList (id, data) {
  return request({
    url: `/order/minimumSettlement/regions/${id}`,
    method: 'put',
    data: data,
  })
}
// 批量 修改订单最低结算金额区域配置
export function updsConfigureRegionList (id, data) {
  return request({
    url: `/order/minimumSettlement/regions/batch/${id}`,
    method: 'put',
    data: data,
  })
}
// 删除订单最低结算金额区域配置
export function delConfigureRegionList (id) {
  return request({
    url: `/order/minimumSettlement/regions/${id}`,
    method: 'delete',
  })
}


// 获取订单最低起配金额配置
export function getDeliveryOrderQuota () {
  return request({
    url: '/order/minimumSettlement/delivery/order',
    method: 'get',
  })
}
// 批量保存订单最低结算金额区域配置
export function saveDeliveryOrderQuota (data) {
  return request({
    url: `/order/minimumSettlement/delivery/order`,
    method: 'post',
    data: data
  })
}
